import Vue from 'vue';
import VueRouter from 'vue-router';
import Index from '../views/home/Index.vue'
import HomePage from '../views/mySettings/homepage/HomePage.vue'
Vue.use(VueRouter)

const routes = [
    {
        path: "/",
        redirect: '/Index'
    },
    {
        path: "/Index",
        component: Index,
        redirect: '/Index/Main',
        children: [
            {
                path: "Main",
                component: () => import('../views/home/main/Main.vue'),
            },
            {
                path: "Message",
                component: () => import('../views/dynamic/Message.vue'),

            },
            {
                path: "Commont",
                component: () => import('../views/dynamic/common/Commont.vue'),
            },
            {
                path: "Follower",
                component: () => import('../views/dynamic/common/Follower.vue'),
            },
            {
                path: "Notice",
                component: () => import('../views/dynamic/common/Notice.vue'),
            },
            {
                path: "Praise",
                component: () => import('../views/dynamic/common/Praise.vue'),
            },
            {
                path: 'mySettings',
                component: () => import('../views/mySettings/mySettings.vue')
            },
            {
                path: 'topage',
                component: () => import('../views/twopage/topage.vue'),
                redirect: '/twopage/twolist',
                children: [{
                    path: '/twopage/twolist',
                    name: 'twolist',
                    component: () => import(/* webpackChunkName: "twopage" */ '../views/twopage/twolist.vue'),
                },
                {
                    path: '/twopage/hotlist',
                    name: 'hotlist',
                    component: () => import(/* webpackChunkName: "twopage" */ '../views/twopage/hotlist.vue'),
                }
                ]
            },



        ]
    },
    {
        path: '/Index/Sourch',
        component: () => import('../views/home/main/Sourch.vue'),
    },
    {
        path: '/Index/Detail',
        component: () => import('../views/dynamic/detail/Detail.vue'),
    },
    {
        path: '/Index/MySettings/HomePage',
        component: HomePage,
        // component:() => import(/* webpackChunkName: "Active" */ '../views/mySettings/homepage/HomePage.vue'),
        redirect: '/Index/MySettings/HomePage/personageActive',
        children: [
            {
                path: "PersonageActive",
                name: "PersonageActive",
                component: () => import(/* webpackChunkName: "Active" */ '../views/mySettings/homepage/homepage_active.vue')
            },
            {
                path: "Article",
                name: "Article",
                component: () => import(/* webpackChunkName: "Article" */ '../views/mySettings/homepage/homepage_article.vue')
            },
            {
                path: "PersonageData",
                name: "PersonageData",
                component: () => import(/* webpackChunkName: "personageData" */ '../views/mySettings/homepage/homepage_data.vue')
            }
        ]
    },
    {
        path: '/Index/MySettings/Post',
        component: () => import(/* webpackChunkName: "Active" */ '../views/mySettings/post/post.vue'),
    },
    {
        path: '/Index/MySettings/Active',
        component: () => import(/* webpackChunkName: "Active" */ '../views/mySettings/active/Active.vue'),
    },
    {
        path: '/Index/MySettings/Wallet',
        component: () => import(/* webpackChunkName: "Active" */ '../views/mySettings/wallet/wallet.vue'),
    },
    {
        path: '/Index/MySettings/Myset',
        component: () => import(/* webpackChunkName: "Active" */ '../views/mySettings/myset/myset.vue'),
    },
    {
        path: '/Index/MySettings/Advice',
        component: () => import(/* webpackChunkName: "Active" */ '../views/mySettings/advice/advice.vue'),
    },

]
const router = new VueRouter({
    mode: 'history',
    routes
})
export default router